package service.Impl;

import dao.UserDao;
import entity.User;
import factory.UserDaoFactory;
import service.UserService;

public class UserServiceImpl implements UserService {
    //通过工厂获取所依赖的UserDao对象
    private UserDao dao = UserDaoFactory.getInstance();

    /**
     * 保存用户信息
     * @param user
     */
    @Override
    public void save(User user) {
        //调用UserDao的方法保存用户信息
        dao.save(user);
    }
}
